package com.lysh.httpSession;

import com.lysh.httpSession.out.IOpenAiApi;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import okhttp3.OkHttpClient;
import okhttp3.sse.EventSource;
import okhttp3.sse.EventSources;

/**
 * @author liyishan
 * @date 2023/6/2 10:27
 * @apiNote
 */

@Slf4j
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Configuration {
    private IOpenAiApi openAiApi;
    private OkHttpClient okHttpClient;
    private String apiKey;

    private String apiHost;
    private String authToken;

    public EventSource.Factory createRequestFactory() {
        return EventSources.createFactory(okHttpClient);
    }


}
